﻿Imports System.ComponentModel

Public Class Community
    Implements INotifyPropertyChanged

    Public Event PropertyChanged(ByVal sender As Object, ByVal e As System.ComponentModel.PropertyChangedEventArgs) Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged

    Public Sub FirePropertyChangedEvent(ByVal propertyName As String)
        RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propertyName))
    End Sub

    Private _isSelected As Boolean
    Public Property IsSelected() As Boolean
        Get
            Return _isSelected
        End Get
        Set(ByVal value As Boolean)
            _isSelected = value
            FirePropertyChangedEvent("IsSelected")
        End Set
    End Property


    Private _isOnAir As Boolean
    Public Property IsOnAir() As Boolean
        Get
            Return _isOnAir
        End Get
        Set(ByVal value As Boolean)
            _isOnAir = value
            FirePropertyChangedEvent("IsOnAir")
        End Set
    End Property

    Private _RecentAirdate As DateTime
    Public Property RecentAirdate() As DateTime
        Get
            Return _RecentAirdate
        End Get
        Set(ByVal value As DateTime)
            _RecentAirdate = value
            FirePropertyChangedEvent("RecentAirdate")
        End Set
    End Property

    Private _name As String
    Public Property Name() As String
        Get
            Return _name
        End Get
        Set(ByVal value As String)
            _name = value
            FirePropertyChangedEvent("Name")
        End Set
    End Property

    Private _uri As Uri
    Public Property Uri() As Uri
        Get
            If _uri Is Nothing Then
                _uri = New Uri("http://ch.nicovideo.jp/community/" & Me.Id)
            End If
            Return _uri
        End Get
        Set(ByVal value As Uri)
            _uri = value
            FirePropertyChangedEvent("Uri")
        End Set
    End Property

    Private _id As String
    Public Property Id() As String
        Get
            Return _id
        End Get
        Set(ByVal value As String)
            _id = value
            FirePropertyChangedEvent("Id")
        End Set
    End Property

    Private _iconUri As Uri
    Public Property IconUri() As Uri
        Get
            Return _iconUri
        End Get
        Set(ByVal value As Uri)
            _iconUri = value
            FirePropertyChangedEvent("IconUri")
        End Set
    End Property

End Class
